package org.bluedream.core.module.entity.goods;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.bluedream.comm.base.OrgPageEntity;
import java.math.BigDecimal;

/**
 * @ClassName Product
 * @Description TODO
 * @Author Administrator
 * @Data 2022/7/1 17:27
 * @Version
 */
@Data
@ToString(callSuper = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "product")
public class Product extends OrgPageEntity<Product> {
    private static final long serialVersionUID = -8126810838415758293L;
    @NonNull
    private String code;
    @NonNull
    private String barcode;
    private BigDecimal oprice;
    private Integer qpc;
    private String qpcStr;
    private String unit;
    private String spec;

    public Product(String id) {
        this.id = id;
    }

    public Product(String code, String barcode, BigDecimal oprice, Integer qpc, String unit, String spec) {
        this.code = code;
        this.barcode = barcode;
        this.oprice = oprice;
        this.qpc = qpc;
        this.unit = unit;
        this.spec = spec;
    }

    public Product(long limit , long pageSize) {
        this.limit = limit;
        this.page = pageSize;
    }
}